package com.kaili.tms.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.tms.mapper.SchedulingSearchMapper;
import com.kaili.tms.pojo.dto.SchedulingSearchQueryDTO;
import com.kaili.tms.pojo.entity.ExportSchedulingSearch;
import com.kaili.tms.pojo.vo.RouteInfoVO;
import com.kaili.tms.pojo.vo.SchedulingSearchVO;
import com.kaili.tms.service.SchedulingSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Desc: 排班查询
 * @author: zengshuai
 * @Time: 19-2-20 上午9:59
 * @Copyright: © 2018 杭州凯立通信有限公司 版权所有
 * @Warning: 本内容仅限于公司内部传阅, 禁止外泄或用于其它商业目的
 */
@Service
public class SchedulingSearchServiceImpl implements SchedulingSearchService{

    @Autowired
    private SchedulingSearchMapper schedulingSearchMapper;

    @Override
    public Page<SchedulingSearchVO> queryScheduling(Page<SchedulingSearchVO> pager, SchedulingSearchQueryDTO queryDTO) {
        List<SchedulingSearchVO> list = schedulingSearchMapper.queryScheduling(pager,queryDTO);
        return pager.setRecords(list);
    }

    @Override
    public List<ExportSchedulingSearch> schedulingSearchExport(Map<String, Object> map) {
        List<ExportSchedulingSearch> list = schedulingSearchMapper.schedulingSearchExport(map);
        return list;
    }

    @Override
    public List<RouteInfoVO> queryRouteByCarTrainNum(Long trainNum) {
        return schedulingSearchMapper.queryRouteByCarTrainNum(trainNum);
    }

    @Override
    public List<RouteInfoVO> queryCityByRouteCode(String routeCode) {
        return schedulingSearchMapper.queryCityByRouteCode(routeCode);
    }


}
